<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : rssFirstPass.xsl
    Created on : June 2, 2013, 10:04 PM
    Author     : Hoang
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes" encoding="UTF-8"/>

    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="/">
        <feeds>
            <xsl:for-each select="//item">
                <xsl:sort select="pubDate" order="descending"/>
                <feed>
                    <title>
                        <xsl:value-of select="title"/>
                    </title>
                    <description>
                        <xsl:value-of select="description"/>
                    </description>
                    <link>
                        <xsl:value-of select="link"/>
                    </link>
                    <pubDate>
                        <xsl:value-of select="pubDate"/>
                    </pubDate>
                </feed>
            </xsl:for-each>
        </feeds>
    </xsl:template>


</xsl:stylesheet>
